﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="SlideShowIntroduction.ascx.cs"
    Inherits="FrontEnd_Body_Center_SlideShowIntroduction" %>

<script type="text/javascript" language="javascript">

var totalPageII='<%=this._pagemaxII %>';

var pageindexII=0;
var totalImageII='<%=this._xpIntroductionImg.Count %>';
var timeDelayII;
var indexII = 0;
var arrayImagesII='<%=_IntroductionImg %>'.split(';');

function DeleteDataII()
{
    var count;
    for (count=0;count<4;count++)
    {
  
        var a1 = document.getElementById('aII'+count); 
        
        if(a1!=null)
        {
        
          var achild=a1.childNodes;
         var length=achild.length;
         
         for(var i=0; i<length; i++)
         {
           a1.removeChild(achild[0]);
    }     
        }
       
    }
}
function previous_imageII()
{  
 
    pageindexII=indexII;
    
    if(pageindexII>0)
    {
        pageindexII--;
    }
    if(pageindexII<=0)
    {
        pageindexII=totalPageII;       
    }  
    DeleteDataII();    
    var count=0;
    for(var k1=(pageindexII-1)*4;k1<totalImageII;k1++)
    {            
        if(count<4)
        {    
           var img=document.createElement('img');                                             
           img.setAttribute('src',arrayImagesII[k1].split(',')[0]);
           img.setAttribute('id','imgII'+count);
           img.setAttribute('border',0);
           var a = document.getElementById('aII'+count);
             a.appendChild(img);
           a.setAttribute('href',arrayImagesII[k1].split(',')[0]);
         
          
           count++;
        }
    }
    indexII = pageindexII;    
}
//function to get the next image in the array

function next_imageII()
{ 

    pageindexII=indexII;
    if (pageindexII==totalPageII) 
       {pageindexII=0}  
    if (pageindexII<totalPageII)
     {
       pageindexII++;                       
         DeleteDataII();
            
       var count=0;
        var k1;
        for(var k1=(pageindexII-1)*4;k1< totalImageII;k1++)
        {            
            if(count<4)
            {                
                var img=document.createElement('img');                                             
                img.setAttribute('src',arrayImagesII[k1].split(',')[0]);
                img.setAttribute('id','imgII'+count);
                img.setAttribute('border',0);
                var a = document.getElementById('aII'+count);
                a.appendChild(img);
                 a.setAttribute('href',arrayImagesII[k1].split(',')[1]);
         count++;
            }
        }
        indexII = pageindexII;                           
     }   
}

function slideshow_automaticII()
{ 

    pageindexII=indexII;
    if (pageindexII==totalPageII) 
       {pageindexII=0}  
    if (pageindexII<totalPageII)
     {
        pageindexII++;  
        previous_imageII();
        timeDelay=setTimeout("slideshow_automaticII()",6000);                    
     }  
}
jaAddEvent(window, 'load', slideshow_automaticII);
</script>

<div>
    <div style="vertical-align: middle; text-align: center; float: left;">
        <a href="javascript:previous_imageII();">
            <img src="images/prev_btn.png" style="padding-top: 25px; border: none" /></a>&nbsp;&nbsp;
    </div>
    <div id="vlightbo1x" style="float: left">
        <%=_Start %>
    </div>
    <div style="vertical-align: middle; text-align: center; float: left">
        <a href="javascript:next_imageII();">
            <img src="images/next_btn.png" style="padding-top: 25px; border: none" /></a>
    </div>
</div>
<%--<div><a href="#"><img src="images/prev_btn.png" style="padding-bottom:25px;border:none;"/></a>&nbsp;&nbsp;
                                        	<img src="images/slide_img1.png" />&nbsp;&nbsp;
                                            <img src="images/slide_img2.png" />&nbsp;&nbsp;
                                            <img src="images/slide_img3.png" />&nbsp;&nbsp;
                                            <img src="images/slide_img4.png" />&nbsp;&nbsp;
                                            <a href="#"><img src="images/next_btn.png" style="padding-bottom:25px;border:none;"/></a>&nbsp;&nbsp;</div>--%>